<h1>ZC Web List</h1>

<table  cellspacing="10" >
  <tr>
    <th>Name</th>
    <th>URL</th>
    <th>Description</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @posts.each do |post| %>
  
  <tr>
    <td><%= post.name %></td>
    <td><a href="<%= post.url %>"><%= post.url %></a></td>
    <td><%= post.description %></td>
    <td><%= link_to 'Show', post %></td>
    <td><%= link_to 'Edit', edit_post_path(post) %></td>
    <td><%= link_to 'Destroy', post, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
  
<% end %>
</table>

<br />

<%= link_to 'New WebSite', new_post_path %>
